Optimal. Leaf size=153 \[ \frac{A-i B}{4 a^2 d \sqrt{a+i a \tan (c+d x)}}-\frac{(A-i B) \tanh ^{-1}\left (\frac{\sqrt{a+i a \tan (c+d x)}}{\sqrt{2} \sqrt{a}}\right )}{4 \sqrt{2} a^{5/2} d}+\frac{A+3 i B}{6 a d (a+i a \tan (c+d x))^{3/2}}-\frac{A+i B}{5 d (a+i a \tan (c+d x))^{5/2}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.228204, antiderivative size = 153, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 5, integrand size = 34, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.147, Rules used = {3590, 3526, 3479, 3480, 206} \[ \frac{A-i B}{4 a^2 d \sqrt{a+i a \tan (c+d x)}}-\frac{(A-i B) \tanh ^{-1}\left (\frac{\sqrt{a+i a \tan (c+d x)}}{\sqrt{2} \sqrt{a}}\right )}{4 \sqrt{2} a^{5/2} d}+\frac{A+3 i B}{6 a d (a+i a \tan (c+d x))^{3/2}}-\frac{A+i B}{5 d (a+i a \tan (c+d x))^{5/2}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3590
Rule 3526
Rule 3479
Rule 3480
Rule 206
Rubi steps
\begin{align*} \int \frac{\tan (c+d x) (A+B \tan (c+d x))}{(a+i a \tan (c+d x))^{5/2}} \, dx &=-\frac{A+i B}{5 d (a+i a \tan (c+d x))^{5/2}}-\frac{i \int \frac{a (A+i B)+2 a B \tan (c+d x)}{(a+i a \tan (c+d x))^{3/2}} \, dx}{2 a^2}\\ &=-\frac{A+i B}{5 d (a+i a \tan (c+d x))^{5/2}}+\frac{A+3 i B}{6 a d (a+i a \tan (c+d x))^{3/2}}-\frac{(i A+B) \int \frac{1}{\sqrt{a+i a \tan (c+d x)}} \, dx}{4 a^2}\\ &=-\frac{A+i B}{5 d (a+i a \tan (c+d x))^{5/2}}+\frac{A+3 i B}{6 a d (a+i a \tan (c+d x))^{3/2}}+\frac{A-i B}{4 a^2 d \sqrt{a+i a \tan (c+d x)}}-\frac{(i A+B) \int \sqrt{a+i a \tan (c+d x)} \, dx}{8 a^3}\\ &=-\frac{A+i B}{5 d (a+i a \tan (c+d x))^{5/2}}+\frac{A+3 i B}{6 a d (a+i a \tan (c+d x))^{3/2}}+\frac{A-i B}{4 a^2 d \sqrt{a+i a \tan (c+d x)}}-\frac{(A-i B) \operatorname{Subst}\left (\int \frac{1}{2 a-x^2} \, dx,x,\sqrt{a+i a \tan (c+d x)}\right )}{4 a^2 d}\\ &=-\frac{(A-i B) \tanh ^{-1}\left (\frac{\sqrt{a+i a \tan (c+d x)}}{\sqrt{2} \sqrt{a}}\right )}{4 \sqrt{2} a^{5/2} d}-\frac{A+i B}{5 d (a+i a \tan (c+d x))^{5/2}}+\frac{A+3 i B}{6 a d (a+i a \tan (c+d x))^{3/2}}+\frac{A-i B}{4 a^2 d \sqrt{a+i a \tan (c+d x)}}\\ \end{align*}
Mathematica [A] time = 2.74036, size = 176, normalized size = 1.15 \[ \frac{e^{-6 i (c+d x)} \left (1+e^{2 i (c+d x)}\right )^{3/2} \sec ^2(c+d x) \left (\sqrt{1+e^{2 i (c+d x)}} \left (A \left (-e^{2 i (c+d x)}+17 e^{4 i (c+d x)}-3\right )-3 i B \left (-3 e^{2 i (c+d x)}+e^{4 i (c+d x)}+1\right )\right )-15 (A-i B) e^{5 i (c+d x)} \sinh ^{-1}\left (e^{i (c+d x)}\right )\right )}{240 a^2 d \sqrt{a+i a \tan (c+d x)}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.023, size = 121, normalized size = 0.8 \begin{align*} 2\,{\frac{1}{ad} \left ( -1/3\,{\frac{-A/4-3/4\,iB}{ \left ( a+ia\tan \left ( dx+c \right ) \right ) ^{3/2}}}-1/10\,{\frac{a \left ( A+iB \right ) }{ \left ( a+ia\tan \left ( dx+c \right ) \right ) ^{5/2}}}-1/8\,{\frac{-A+iB}{a\sqrt{a+ia\tan \left ( dx+c \right ) }}}-1/16\,{\frac{ \left ( A-iB \right ) \sqrt{2}}{{a}^{3/2}}{\it Artanh} \left ( 1/2\,{\frac{\sqrt{a+ia\tan \left ( dx+c \right ) }\sqrt{2}}{\sqrt{a}}} \right ) } \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 2.05337, size = 1095, normalized size = 7.16 \begin{align*} -\frac{{\left (15 \, \sqrt{\frac{1}{2}} a^{3} d \sqrt{\frac{A^{2} - 2 i \, A B - B^{2}}{a^{5} d^{2}}} e^{\left (6 i \, d x + 6 i \, c\right )} \log \left (\frac{{\left (2 i \, \sqrt{\frac{1}{2}} a^{3} d \sqrt{\frac{A^{2} - 2 i \, A B - B^{2}}{a^{5} d^{2}}} e^{\left (2 i \, d x + 2 i \, c\right )} + \sqrt{2}{\left ({\left (i \, A + B\right )} e^{\left (2 i \, d x + 2 i \, c\right )} + i \, A + B\right )} \sqrt{\frac{a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} e^{\left (i \, d x + i \, c\right )}\right )} e^{\left (-i \, d x - i \, c\right )}}{i \, A + B}\right ) - 15 \, \sqrt{\frac{1}{2}} a^{3} d \sqrt{\frac{A^{2} - 2 i \, A B - B^{2}}{a^{5} d^{2}}} e^{\left (6 i \, d x + 6 i \, c\right )} \log \left (\frac{{\left (-2 i \, \sqrt{\frac{1}{2}} a^{3} d \sqrt{\frac{A^{2} - 2 i \, A B - B^{2}}{a^{5} d^{2}}} e^{\left (2 i \, d x + 2 i \, c\right )} + \sqrt{2}{\left ({\left (i \, A + B\right )} e^{\left (2 i \, d x + 2 i \, c\right )} + i \, A + B\right )} \sqrt{\frac{a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} e^{\left (i \, d x + i \, c\right )}\right )} e^{\left (-i \, d x - i \, c\right )}}{i \, A + B}\right ) - \sqrt{2}{\left ({\left (17 \, A - 3 i \, B\right )} e^{\left (6 i \, d x + 6 i \, c\right )} + 2 \,{\left (8 \, A + 3 i \, B\right )} e^{\left (4 i \, d x + 4 i \, c\right )} - 2 \,{\left (2 \, A - 3 i \, B\right )} e^{\left (2 i \, d x + 2 i \, c\right )} - 3 \, A - 3 i \, B\right )} \sqrt{\frac{a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} e^{\left (i \, d x + i \, c\right )}\right )} e^{\left (-6 i \, d x - 6 i \, c\right )}}{120 \, a^{3} d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: AttributeError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{{\left (B \tan \left (d x + c\right ) + A\right )} \tan \left (d x + c\right )}{{\left (i \, a \tan \left (d x + c\right ) + a\right )}^{\frac{5}{2}}}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]